package com.book.derecated.state;

import com.book.utils.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @param
 * @author oyz
 * @version 1.0.4
 * @description: 被观察者具体实现类
 * @date 2023/11/27 22:26
 */
@Component
public class DeprecatedCreateOrder extends DeprecatedAbstractOrderState {

    @Autowired
    private RedisUtils redisUtils;

    @Autowired
    private DeprecatedSendOrder deprecatedSendOrder;


    @Override
    protected DeprecatedOrder createOrder(String orderId, DeprecatedOrderContext context) {
        // 提醒观察者
        super.notifyObserver(orderId, ORDER_WAIT_PAY);
        return null;
    }


}
